{capture name=path}{l s='Webboard'}{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}
{include file="$tpl_dir./errors.tpl"}
<!-- Webboard Template -->
<!-- <script type="text/javascript" src="{$content_dir}js/webboard.js"></script>-->
{literal}
<script type="text/javascript">
$(function(){
//	$("#enter-topic").click(function(){
//			$("#form-enter-topic").submit();
//			return false;
//		});
});
</script>
{/literal}
<div id="my-webboard">
	<h4>
		<div class="webboard_icon">
			<a id="webboard_icon" href="webboard.php" title="webboard home"></a>
		</div>
		<div class="new_topic">
			<a id="button_new_topic" href="webboard.php?action=post&board=0.{$selectedPage}&back={$back}" title="NEW TOPIC"></a>
		</div>
	</h4>
	<ul class="block_content">
		<li class="title-bar">
			<div class="topic_logo"></div>
			<div class="topic">
				Topic					
			</div>
			<div class="replies">Replies</div>
			<div class="views">Views</div>
			<div class="post_info">
				Lasted Post Info
			</div>			
		</li>
		{foreach from=$topics item=topic}
			<li class="topic_row">
				<div class="topic_row_wrapper">
					{if $topic.pin == 'Y'}
					<div class="topic_logo pin"></div>
					{else}
					<div class="topic_logo unpin"></div>
					{/if}
					<div class="topic">						
						<a id="enter-topic" href="webboard.php?topic={$topic.topic_id}.1" title="{$topic.topic_title|escape:htmlall:'UTF-8'}">{$topic.topic_title|escape:htmlall:'UTF-8'|truncate:100}</a>
						{if $adminUser}{* if admin, can pin and delete topic*}
							{assign var='pin_action' value=$topic.pin}
							{assign var='topic_id' value=$topic.topic_id}
							{assign var='type' value='topic'}
							{include file="$tpl_dir./webboard-admin-panel.tpl"}
						{/if}		
					</div>
					<div class="replies">{$topic.num_reply}</div>
					<div class="views">{$topic.views}</div>
					<div class="post_info">
						<p class="author"><b>Author: </b>{$topic.author|escape:htmlall:'UTF-8'}({$topic.author_username|escape:htmlall:'UTF-8'}){if $topic.show_admin_icon == true}<img class="admin_icon" src='{$img_dir}admin_icon.png' />{/if}</p>
						<p class="posted"><b>Posted: </b>{$topic.post_time|escape:htmlall:'UTF-8'}</p>
					</div>
				</div>
			</li>
			<!-- 
			<li class="space">
			</li>
			 -->
		{/foreach}
	</ul>
	<div class="footer">
		{include file="$tpl_dir./webboard-pagination.tpl"}	
	</div>
</div>